[How not to commit mistake...???]
We won't commit any mistake if we just stay where we are do nothing. That is the easiest way not to commit any mistake.
We won't learn and develop until we commit a mistake. To commit a mistake is only the beginning but what we learn from the mistake is the most important. We become wiser only when we take lesson from our mistake and be a better person. The best of all is to learn from other people mistake.
How? Read the Quran & Sunnah and InshaAllah we will learn from the mistake of the previous nation. Allah SWT has told us in the Quran;
"There was certainly in their stories a lesson for those of understanding. Never was the Qur'an a narration invented, but a confirmation of what was before it and a detailed explanation of all things and guidance and mercy for a people who believe."
[Surat Yūsuf 12:111]